package com.craftplay.service;

import com.craftplay.dao.PageMapper;
import com.craftplay.model.AdminUser;
import com.craftplay.model.Content;
import com.craftplay.model.WeiXinInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PageService {

    @Autowired
    private PageMapper pageMapper;


    /**
     * 根据用户名查找用户表
     *
     * @param userName
     * @return
     */
    public List<AdminUser> adminUserSelectByUserName(String userName) {
        return pageMapper.adminUserSelectByUserName(userName);
    }

    /**
     * 更新用户信息
     *
     * @param adminUser
     * @return
     */
    public int adminUserUpdateByPrimaryKey(AdminUser adminUser) {
        return pageMapper.adminUserUpdateByPrimaryKey(adminUser);
    }

    /**
     * 查询Content 表中的内容
     *
     * @param content
     * @return
     */
    public List<Content> getContentList(Content content) {
        return pageMapper.getContentList(content);
    }

    /**
     * 更新 Content 表中数据
     *
     * @param content
     * @return
     */
    public int updateContent(Content content) {
        return pageMapper.updateContent(content);
    }
}
